# Use an official Python runtime as a parent image
FROM python:3.8

ENV PYTHONPATH /auto_test/

# Upgrade and install requirements.txt
COPY ./requirements.txt /requirements.txt

RUN \
    pip3 install --no-cache-dir -r /requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/ && \
    ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
    echo 'Asia/Shanghai' > /etc/timezone
 
# Copy source code folder
COPY . /auto_test/
WORKDIR /auto_test/

# Make port 8888 available to the world outside this container
EXPOSE 8888

# Define default command
CMD ["tail","-f","/dev/null"]
